home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1078 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  2.3 KB

  1. From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
  2. Date: Wed, 23 Feb 94 11:04:29 +0100
  3. Message-Id: <9402231004.AA19701@issan.informatik.uni-dortmund.de>
  4. To: mint@atari.archive.umich.edu
  5. Subject: MiNT 1.10: update for gcc 2.5, function never returns
  6.  
  7. This patch updates the sources to use the new way of gcc to declare
  8. that a function never returns, by adding `__attribute__((noreturn))'
  9. to the declaration.
  10.  
  11. diff -ur orig/debug.c ./debug.c
  12. --- orig/debug.c    Mon Sep 27 22:35:48 1993
  13. +++ ./debug.c    Sat Feb 19 12:06:02 1994
  14. @@ -535,7 +535,7 @@
  15.      int scan;
  16.      extern long tosssp;    /* in main.c */
  17.  #ifdef PROFILING
  18. -    extern EXITING _exit P_((int));
  19. +    extern EXITING _exit P_((int)) NORETURN;
  20.  #endif
  21.      restr_intr();    /* restore interrupts to normal */
  22.  #ifdef DEBUG_INFO
  23. diff -ur orig/file.h ./file.h
  24. --- orig/file.h    Tue Feb 15 23:21:30 1994
  25. +++ ./file.h    Thu Feb 17 21:14:30 1994
  26. @@ -208,7 +208,7 @@
  27.      void    ARGS_ON_STACK (*trace) P_((const char *, ...));
  28.      void    ARGS_ON_STACK (*debug) P_((const char *, ...));
  29.      void    ARGS_ON_STACK (*alert) P_((const char *, ...));
  30. -    EXITING void ARGS_ON_STACK (*fatal) P_((const char *, ...));
  31. +    EXITING void ARGS_ON_STACK (*fatal) P_((const char *, ...)) NORETURN;
  32.  
  33.  /* memory allocation functions */
  34.      void *    ARGS_ON_STACK (*kmalloc) P_((long));
  35. diff -ur orig/mint.h ./mint.h
  36. --- orig/mint.h    Fri Feb 11 19:38:38 1994
  37. +++ ./mint.h    Thu Feb 17 21:01:48 1994
  38. @@ -59,9 +59,19 @@
  39.   */
  40.  
  41.  #ifdef __GNUC__
  42. -#define EXITING volatile    /* function never returns */
  43. +#if __GNUC__ > 2 || __GNUC_MINOR__ >= 5
  44. +#define NORETURN __attribute__ ((noreturn))    /* function never returns */
  45.  #else
  46. +#define EXITING volatile    /* function never returns */
  47. +#endif
  48. +#endif
  49. +
  50. +#ifndef EXITING
  51.  #define EXITING
  52. +#endif
  53. +
  54. +#ifndef NORETURN
  55. +#define NORETURN
  56.  #endif
  57.  
  58.  #ifdef dLibs
  59. diff -ur orig/proto.h ./proto.h
  60. --- orig/proto.h    Fri Feb 11 19:35:00 1994
  61. +++ ./proto.h    Thu Feb 17 21:21:24 1994
  62. @@ -353,8 +353,8 @@
  63.  void ARGS_ON_STACK ALERT P_((const char *s, ...));
  64.  void ARGS_ON_STACK FORCE P_((const char *s, ...));
  65.  void PAUSE P_((void));
  66. -EXITING void ARGS_ON_STACK FATAL P_((const char *s, ...));
  67. -EXITING void HALT P_((void));
  68. +EXITING void ARGS_ON_STACK FATAL P_((const char *, ...)) NORETURN;
  69. +EXITING void HALT P_((void)) NORETURN;
  70.  void DUMPLOG P_((void));
  71.  void do_func_key P_((int));
  72.  
  73.